

varying		vec4	v_fragmentColor;
varying		vec2	v_texCoord;

attribute	vec4	a_position;
attribute	vec2	a_texCoord;

uniform		mat4	u_MVPMatrix;
                        
       
// 0 = Normal - 1 = Textured - 2 = Gradient 
uniform		int		u_ActiveShader;

uniform		vec4	u_color; 


void vertex_normal(){
	gl_Position = u_MVPMatrix * a_position;
    v_fragmentColor = u_color;
} 	

void vertex_textured(){
    gl_Position = u_MVPMatrix * a_position;            
    v_texCoord = a_texCoord;                   
} 

void vertex_gradient(){
    gl_Position = u_MVPMatrix * a_position;            
    v_texCoord = a_texCoord;  
} 

		                                               
void main(){
	if(u_ActiveShader == 0){
		vertex_normal();
	}
	else if(u_ActiveShader == 1){
		vertex_textured();
	}
	else if(u_ActiveShader == 2){
		vertex_gradient();
	}
}